﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserControlContactForm.aspx.cs" Inherits="Skole01.UserControlContactForm" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">

    <!-- Optional theme -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css">

    <!-- Latest compiled and minified JavaScript -->
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <p>
            Navn:
            <asp:TextBox ID="txtName" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ControlToValidate="txtName" ID="RequiredFieldValidator1" runat="server" ErrorMessage="Skal udfyldes" ForeColor="red" SetFocusOnError="True"></asp:RequiredFieldValidator>
        </p>
        <p>
            E-mail:
            <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ControlToValidate="txtEmail" Display="Dynamic" ID="RequiredFieldValidator2" runat="server" ErrorMessage="Skal udfyldes" ForeColor="red" SetFocusOnError="True"></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmail" ErrorMessage="Skal være en email!" ForeColor="red" SetFocusOnError="True" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
        </p>
        <p>
            Adresse:
            <asp:TextBox ID="txtAddress" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ControlToValidate="txtAddress" ID="RequiredFieldValidator3" runat="server" ErrorMessage="Skal udfyldes" ForeColor="red" SetFocusOnError="True"></asp:RequiredFieldValidator>
        </p>
        <p>
            Postnummer:
            <asp:TextBox ID="txtZipcode" runat="server"></asp:TextBox>
            <asp:RequiredFieldValidator ControlToValidate="txtZipcode" ID="RequiredFieldValidator4" runat="server" ErrorMessage="Skal udfyldes" Display="Dynamic" ForeColor="red" SetFocusOnError="True"></asp:RequiredFieldValidator>
            <asp:RangeValidator ID="RangeValidator1" ControlToValidate="txtZipcode" runat="server" ErrorMessage="Skal være mellem 800 og 9999" Type="Integer" MaximumValue="9999" MinimumValue="800" ForeColor="red" SetFocusOnError="True"></asp:RangeValidator>
        </p>
        <p>
            Land:
            <asp:DropDownList ID="ddlCountry" runat="server">
                <asp:ListItem Value="DK">Danmark</asp:ListItem>
                <asp:ListItem Value="SE">Sverige</asp:ListItem>
                <asp:ListItem Value="NO">Norge</asp:ListItem>
            </asp:DropDownList>
        </p>
        <p>
            <asp:Button ID="btnSubmit" runat="server" Text="Ok" OnClick="btnSubmit_Click" />
        </p>
        <p>
            <div runat="server" id="divBox" style="border: 3px solid #000080; background-color: #006400; width: 300px; height: 100px;">
                
                <asp:Label ID="lblName" runat="server" Text="Label"></asp:Label><br/>
                <asp:Label ID="lblEmail" runat="server" Text="Label"></asp:Label><br/>
                <asp:Label ID="lblAddress" runat="server" Text="Label"></asp:Label><br/>
                <asp:Label ID="lblZipcode" runat="server" Text="Label"></asp:Label><br/>
                <asp:Label ID="lblCountry" runat="server" Text="Label"></asp:Label><br/>

            </div>
        </p>
    </div>
    </form>
</body>
</html>
